<include file="public/head"/>
<include file="public/scripts"/>
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
</style>
<body>
<div class="wrap js-check-wrap">
    <!--<ul class="nav nav-tabs">-->
        <!--<li><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/index')}">微信公众号信息</a></li>-->
        <!--<li class="active"><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/reply')}">公众号管理</a></li>-->
    <!--</ul>-->
    <!--<br>-->
    <!--<ul class="nav nav-tabs">-->
        <!--<li><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/reply')}">回复消息</a></li>-->
        <!--<li><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/menu')}?id=0">自定义菜单</a></li>-->
        <!--<li  class="active"><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/menu_list')}">个性义菜单</a></li>-->
    <!--</ul>-->
    <!--<br>-->

    <ul class="nav nav-tabs">
        <li  class="active"><a href="javascript:;">个性菜单列表</a></li>
        <li><a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/add_mat_menu')}">添加个性菜单栏</a></li>

    </ul>
    <form class="js-ajax-form" action="" method="post">
        <br>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <td>编号</td>
                <td>个性菜单名称</td>
                <td>性别</td>
                <td>客户端系统</td>
                <td>国家</td>
                <td>省份</td>
                <td>城市</td>
                <td>语言</td>
                <td>添加时间</td>
                <td>操作</td>
            </tr>
            </thead>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.name}</td>
                    <td><if condition="$vo.sex eq 1">男 <elseif condition="$vo.sex eq 2" />女 </if></td>
                    <td><if condition="$vo.os_type eq 1">ios <elseif condition="$vo.os_type eq 2" />安卓 <else />其他</if></td>
                    <td>中国</td>
                    <td>{$vo.p_name}</td>
                    <td>{$vo.c_name}</td>
                    <td>{$vo.lan_name}</td>
                    <td>{$vo.add_time|date='Y-m-d H:i:s',###}</td>
                    <td>
                        <a href="javascript:void(0);" lid="{$vo.id}" onclick="updat_menu($(this));">更新</a>
                        <a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/edit_mat_menu')}?id={$vo.id}">编辑</a>
                        <a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/menu')}?id={$vo.id}&name={$vo.name}">菜单管理</a>
                        <a href="{:cmf_plugin_url('QbtWxOs://AdminIndex/del_g_menu')}?id={$vo.id}">删除</a>
                    </td>
                </tr>
            </foreach>
            <script>
                function updat_menu(a){
                    var id = $(a).attr('lid');
                    $.ajax({
                        type:'post',
                        url: "{:cmf_plugin_url('QbtWxOs://AdminIndex/gx_menu')}",
                        async: false,
                        data: {'id':id},
                        dataType: "json",
                        success: function (data) {
                            if(data == 0){
                                layer.msg('无数据');
                            }else if(data == 1){
                                layer.msg('更新成功！');
                            }
                        }
                    })
                }
            </script>
        </table>

        <ul class="pagination">{$page|default=''}</ul>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript" src="__STATIC__/js/layer/layer.js"></script>
</body>
</html>
